package com.hzmg.web.controller;

import com.hzmg.web.common.ResultDTO;
import com.hzmg.web.vo.HelloReqVo;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/demo2")
public class Demo2Controller {

    @PutMapping("/hello")
    public ResultDTO<String> helloPut(@RequestParam("s") String s) {
        return ResultDTO.success("hello world put" + s);
    }

    @GetMapping("/hello")
    public ResultDTO<String> hello() {
        return ResultDTO.success("hello world");
    }

    @DeleteMapping("/hello")
    public ResultDTO<String> helloDelete(@RequestBody HelloReqVo helloReqVo) {
        return ResultDTO.success("hello world delete" + helloReqVo.getHello());
    }

    @PostMapping("/hello")
    public ResultDTO<String> helloGet(@RequestBody String s) {
        return ResultDTO.success("hello world get" + s);
    }
}
